// $ANTLR 3.3 Nov 30, 2010 12:45:30 /home/sakho/eclipse_juno_jee/Workspace/GammaTaf/src/main/antlr3/lifo/GammaTaf/SerieParallel/parsers/SerieParallel.g 2013-02-14 15:19:08

  package lifo.GammaTaf.SerieParellel.parsers;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

import org.antlr.runtime.debug.*;
import java.io.IOException;

import org.antlr.runtime.tree.*;

public class SerieParallelParser extends DebugParser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "SALUTATION", "ENDSYMBOL"
    };
    public static final int EOF=-1;
    public static final int SALUTATION=4;
    public static final int ENDSYMBOL=5;

    // delegates
    // delegators

    public static final String[] ruleNames = new String[] {
        "invalidRule", "expression"
    };
    public static final boolean[] decisionCanBacktrack = new boolean[] {
        false, // invalid decision
    };

     
        public int ruleLevel = 0;
        public int getRuleLevel() { return ruleLevel; }
        public void incRuleLevel() { ruleLevel++; }
        public void decRuleLevel() { ruleLevel--; }
        public SerieParallelParser(TokenStream input) {
            this(input, DebugEventSocketProxy.DEFAULT_DEBUGGER_PORT, new RecognizerSharedState());
        }
        public SerieParallelParser(TokenStream input, int port, RecognizerSharedState state) {
            super(input, state);
            DebugEventSocketProxy proxy =
                new DebugEventSocketProxy(this,port,adaptor);
            setDebugListener(proxy);
            setTokenStream(new DebugTokenStream(input,proxy));
            try {
                proxy.handshake();
            }
            catch (IOException ioe) {
                reportError(ioe);
            }
            TreeAdaptor adap = new CommonTreeAdaptor();
            setTreeAdaptor(adap);
            proxy.setTreeAdaptor(adap);
        }
    public SerieParallelParser(TokenStream input, DebugEventListener dbg) {
        super(input, dbg);

         
        TreeAdaptor adap = new CommonTreeAdaptor();
        setTreeAdaptor(adap);

    }
    protected boolean evalPredicate(boolean result, String predicate) {
        dbg.semanticPredicate(result, predicate);
        return result;
    }

    protected DebugTreeAdaptor adaptor;
    public void setTreeAdaptor(TreeAdaptor adaptor) {
        this.adaptor = new DebugTreeAdaptor(dbg,adaptor);

    }
    public TreeAdaptor getTreeAdaptor() {
        return adaptor;
    }


    public String[] getTokenNames() { return SerieParallelParser.tokenNames; }
    public String getGrammarFileName() { return "/home/sakho/eclipse_juno_jee/Workspace/GammaTaf/src/main/antlr3/lifo/GammaTaf/SerieParallel/parsers/SerieParallel.g"; }


    public static class expression_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "expression"
    // /home/sakho/eclipse_juno_jee/Workspace/GammaTaf/src/main/antlr3/lifo/GammaTaf/SerieParallel/parsers/SerieParallel.g:22:1: expression : SALUTATION ENDSYMBOL ;
    public final SerieParallelParser.expression_return expression() throws RecognitionException {
        SerieParallelParser.expression_return retval = new SerieParallelParser.expression_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token SALUTATION1=null;
        Token ENDSYMBOL2=null;

        Object SALUTATION1_tree=null;
        Object ENDSYMBOL2_tree=null;

        try { dbg.enterRule(getGrammarFileName(), "expression");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(22, 1);

        try {
            // /home/sakho/eclipse_juno_jee/Workspace/GammaTaf/src/main/antlr3/lifo/GammaTaf/SerieParallel/parsers/SerieParallel.g:22:12: ( SALUTATION ENDSYMBOL )
            dbg.enterAlt(1);

            // /home/sakho/eclipse_juno_jee/Workspace/GammaTaf/src/main/antlr3/lifo/GammaTaf/SerieParallel/parsers/SerieParallel.g:22:14: SALUTATION ENDSYMBOL
            {
            root_0 = (Object)adaptor.nil();

            dbg.location(22,14);
            SALUTATION1=(Token)match(input,SALUTATION,FOLLOW_SALUTATION_in_expression70); 
            SALUTATION1_tree = (Object)adaptor.create(SALUTATION1);
            adaptor.addChild(root_0, SALUTATION1_tree);

            dbg.location(22,25);
            ENDSYMBOL2=(Token)match(input,ENDSYMBOL,FOLLOW_ENDSYMBOL_in_expression72); 
            ENDSYMBOL2_tree = (Object)adaptor.create(ENDSYMBOL2);
            adaptor.addChild(root_0, ENDSYMBOL2_tree);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        dbg.location(22, 34);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "expression");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return retval;
    }
    // $ANTLR end "expression"

    // Delegated rules


 

    public static final BitSet FOLLOW_SALUTATION_in_expression70 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_ENDSYMBOL_in_expression72 = new BitSet(new long[]{0x0000000000000002L});

}